package com.zx.account.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.math.BigDecimal;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;

@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("acc_account")
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class Account extends Model<Account> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键Id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 消费时间
     */
    @DateTimeFormat(iso = ISO.DATE)
    private Date consumeDate;

    /**
     * 消费类型id
     */
    private Integer tId;

    /**
     * 消费类型详情id
     */
    private Integer tDId;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 描述
     */
    private String description;

    /**
     * 用户编号
     */
    private Integer userId;

    /**
     * 创建时间
     */
    private Date createTime;

}
